<?php

header("Content-type:text/html;charset:utf8;");
header("Pragma: no-cache");
header("Pragma: no-cache");

date_default_timezone_set('PRC');

if (!defined('ROOT_PATH')) {
	define("ROOT_PATH",realpath('.'));
}

spl_autoload_register(function ($classname){
	require(ROOT_PATH.DIRECTORY_SEPARATOR.$classname.'.php');
});

/*$autoload = 'f_autoload';
if (function_exists($autoload)) {
	$autoload .= 'abc';
	spl_autoload_register($autoload= function ($classname){
		require(ROOT_PATH.DIRECTORY_SEPARATOR.$classname.'.php');
	});
	$autoload = function ($classname){
		require(ROOT_PATH.DIRECTORY_SEPARATOR.$classname.'.php');
	};
}else{
	spl_autoload_register($autoload = function($classname){
		// echo ROOT_PATH.DIRECTORY_SEPARATOR.$classname.'.php';die;
		require(ROOT_PATH.DIRECTORY_SEPARATOR.$classname.'.php');
	});
}*/

//助手函数
// echo $autoload;die;
function M($str){
	return Factory::getShape($str);
}




M('rectangle')->draw();
















